package com.xc.hotelmgr.order.modules.order.service.impl;

import com.xc.hotelmgr.order.common.utils.Constant;
import org.springframework.stereotype.Service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.xc.hotelmgr.order.modules.order.dao.DtOrderChannelsDao;
import com.xc.hotelmgr.order.modules.order.entity.DtOrderChannelsEntity;
import com.xc.hotelmgr.order.modules.order.service.DtOrderChannelsService;


@Service("dtOrderChannelsService")
public class DtOrderChannelsServiceImpl extends ServiceImpl<DtOrderChannelsDao, DtOrderChannelsEntity> implements DtOrderChannelsService {

    @Override
    public DtOrderChannelsEntity sqlSelectKey(int chanel, String userName) {
        return  baseMapper.sqlSelectKey(chanel,userName);
    }

    @Override
    public void refreshToken(String aid,String accessToken,String refreshToken,Integer expiresIn) {
        baseMapper.refreshToken(aid,accessToken,refreshToken,expiresIn);
    }
    @Override
    public List<DtOrderChannelsEntity> sqlSelectByChanel(Constant.Channel ctrip) {

        return baseMapper.sqlSelectByChanel(ctrip.getValue());
    }

    @Override
    public Integer sqlIsAutoByHotelId(String hotelId) {
        return  baseMapper.sqlIsAutoByHotelId(hotelId);
    }

    @Override
    public DtOrderChannelsEntity sqlSelectByOrderId(Integer channel, String orderId) {

        return baseMapper.sqlSelectByOrderId(channel,orderId);
    }

    @Override
    public DtOrderChannelsEntity getByStoreIdAndChannel(Integer storeId, Integer channel) {
        return baseMapper.getByStoreIdAndChannel(storeId, channel);
    }

}